package com.hanrui.android.base;

import android.app.Application;

import org.xutils.x;

public class XApp {
    private static Application application;
    private static boolean debug;


    public static void init(Application app){
        setApplication(app);
        setDebug(true);
        x.Ext.init(app);
    }

    public static void init(Application app, boolean debug){
        setApplication(app);
        setDebug(debug);
        x.Ext.init(app);
    }

    public static Application getApplication() {
        return application;
    }

    private static void setApplication(Application application) {
        XApp.application = application;
    }

    public static boolean isDebug() {
        return debug;
    }

    public static void setDebug(boolean debug) {
        XApp.debug = debug;
    }
}
